<?php

namespace Cck\ArticlesSystem;

use Illuminate\Support\Facades\Route;

class ArticleSystem
{
    public static function routes(array $options = [])
    {
        $defaultOptions = [
            'prefix' => 'god',
            'as' => 'god.',
            'namespace' => '\Cck\ArticlesSystem\Http\Controllers',
            'middleware' => \Cck\ArticlesSystem\Http\Middleware\GodApiResponse::class
        ];

        $options = array_merge($defaultOptions, $options);

        Route::group($options, function () {
            include __DIR__  . '/../routes/admin.php';
        });
    }
}
